﻿<?php

class CacheApp extends BaseApp
{
    function index()
    {
		
		 $this->cache();		
		 $notice = &get_message(array('msg'=>'Success!','url'=>'?app=default&act=main','title'=>'Notice'));
		 $notice ->display();
		 
    }


    function cache()
    {
         
		 $cache_dir = array(ROOT_PATH . '/temp/caches',ROOT_PATH . '/temp/compiled',);
		 foreach($cache_dir as $key => $value)
		 {
			   if(file_exists($value))
		       {
		             del_file($value);	
		       }			 	 
		 }
		 $cache_dir = array(ROOT_PATH . '/temp/caches',ROOT_PATH . '/temp/viewmanange',);
		 foreach($cache_dir as $key => $value)
		 {
			   if(file_exists($value))
		       {
		             del_file($value);	
		       }	 
		 }
    }	

	
}



?>